home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / docume1a / frmprevi (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-08-07  |  3.5 KB  |  115 lines

  1. VERSION 5.00
  2. Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
  3. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  4. Begin VB.Form frmPreview 
  5.    Caption         =   "                                                                                    Print Preview"
  6.    ClientHeight    =   3195
  7.    ClientLeft      =   165
  8.    ClientTop       =   735
  9.    ClientWidth     =   4680
  10.    ClipControls    =   0   'False
  11.    ControlBox      =   0   'False
  12.    LinkTopic       =   "Form1"
  13.    ScaleHeight     =   3195
  14.    ScaleWidth      =   4680
  15.    StartUpPosition =   3  'Windows Default
  16.    WindowState     =   2  'Maximized
  17.    Begin MSComDlg.CommonDialog CommonDialog1 
  18.       Left            =   2160
  19.       Top             =   1320
  20.       _ExtentX        =   847
  21.       _ExtentY        =   847
  22.       _Version        =   393216
  23.    End
  24.    Begin RichTextLib.RichTextBox RichTextBox1 
  25.       Height          =   7500
  26.       Left            =   0
  27.       TabIndex        =   3
  28.       Top             =   480
  29.       Width           =   12000
  30.       _ExtentX        =   21167
  31.       _ExtentY        =   13229
  32.       _Version        =   393217
  33.       Enabled         =   -1  'True
  34.       ScrollBars      =   2
  35.       DisableNoScroll =   -1  'True
  36.       TextRTF         =   $"frmPreview1.frx":0000
  37.    End
  38.    Begin VB.CommandButton Command3 
  39.       Height          =   495
  40.       Left            =   6120
  41.       Picture         =   "frmPreview1.frx":00AE
  42.       Style           =   1  'Graphical
  43.       TabIndex        =   2
  44.       ToolTipText     =   "Closes Preview"
  45.       Top             =   0
  46.       Width           =   975
  47.    End
  48.    Begin VB.CommandButton Command2 
  49.       Height          =   495
  50.       Left            =   5160
  51.       Picture         =   "frmPreview1.frx":01F8
  52.       Style           =   1  'Graphical
  53.       TabIndex        =   1
  54.       ToolTipText     =   "Prints Document"
  55.       Top             =   0
  56.       Width           =   975
  57.    End
  58.    Begin VB.CommandButton Command1 
  59.       Height          =   495
  60.       Left            =   4200
  61.       Picture         =   "frmPreview1.frx":0862
  62.       Style           =   1  'Graphical
  63.       TabIndex        =   0
  64.       ToolTipText     =   "Preview"
  65.       Top             =   0
  66.       Width           =   975
  67.    End
  68.    Begin VB.Menu mnuFile 
  69.       Caption         =   "&File"
  70.       Begin VB.Menu mnuPreview 
  71.          Caption         =   "&Print Preview"
  72.       End
  73.       Begin VB.Menu mnuPrint 
  74.          Caption         =   "&Print"
  75.          Shortcut        =   ^P
  76.       End
  77.       Begin VB.Menu mnu1 
  78.          Caption         =   "-"
  79.       End
  80.       Begin VB.Menu mnuExit 
  81.          Caption         =   "&Exit"
  82.       End
  83.    End
  84. Attribute VB_Name = "frmPreview"
  85. Attribute VB_GlobalNameSpace = False
  86. Attribute VB_Creatable = False
  87. Attribute VB_PredeclaredId = True
  88. Attribute VB_Exposed = False
  89. Private Sub Command1_Click()
  90. If boolnew = True Then
  91. RichTextBox1.Text = frmOpenDoc.RichTextBox1.Text
  92. RichTextBox1.LoadFile MDIForm1.CommonDialog1.filename
  93. End If
  94. End Sub
  95. Private Sub Command2_Click()
  96. Call PrintDoc
  97. End Sub
  98. Private Sub Command3_Click()
  99. Unload Me
  100. frmOpenDoc.SetFocus
  101. End Sub
  102. Private Sub mnuExit_Click()
  103. Unload Me
  104. frmOpenDoc.SetFocus
  105. End Sub
  106. Private Sub mnuPreview_Click()
  107. If boolnew = True Then
  108. RichTextBox1.Text = frmOpenDoc.RichTextBox1.Text
  109. RichTextBox1.LoadFile MDIForm1.CommonDialog1.filename
  110. End If
  111. End Sub
  112. Private Sub mnuPrint_Click()
  113. Call PrintDoc
  114. End Sub
  115.